inherited fTransfProduto: TfTransfProduto
  Left = 122
  Top = 61
  Width = 788
  Height = 614
  Caption = 'Transf. Produto'
  OldCreateOrder = True
  PixelsPerInch = 96
  TextHeight = 13
  inherited MMJPanel1: TMMJPanel
    Width = 772
    object Label1: TLabel
      Left = 24
      Top = 16
      Width = 60
      Height = 13
      Caption = 'Componente'
      Transparent = True
    end
    object edMaterial: TEdit
      Left = 96
      Top = 16
      Width = 137
      Height = 21
      PopupMenu = PopupMenu1
      TabOrder = 0
      OnExit = edMaterialExit
      OnKeyPress = FormKeyPress
    end
    object edDescri: TEdit
      Left = 240
      Top = 16
      Width = 521
      Height = 21
      Color = cl3DLight
      Enabled = False
      TabOrder = 1
    end
  end
  inherited MMJPanel2: TMMJPanel
    Top = 395
    Width = 772
    Height = 181
    PopupMenu = PopupMenu2
    object lblProd: TLabel [0]
      Left = 352
      Top = 65
      Width = 55
      Height = 13
      Caption = 'Justificativa'
      Transparent = True
    end
    object Label2: TLabel [1]
      Left = 528
      Top = 8
      Width = 62
      Height = 13
      Caption = 'TRANFERIR'
      Transparent = True
    end
    object Label5: TLabel [2]
      Left = 528
      Top = 37
      Width = 32
      Height = 13
      Caption = 'Quant.'
      Transparent = True
    end
    object Label6: TLabel [3]
      Left = 351
      Top = 40
      Width = 36
      Height = 13
      Caption = 'Destino'
      Transparent = True
    end
    inherited btnGravar: TBitBtn
      Left = 439
      Top = 125
      Caption = 'F5-Transferir'
      TabOrder = 7
    end
    inherited btnIncluir: TBitBtn
      Top = 117
      TabOrder = 2
      Visible = False
    end
    inherited btnCancelar: TBitBtn
      Left = 331
      Top = 125
    end
    inherited btnExcluir: TBitBtn
      Left = 282
      Top = 84
      TabOrder = 3
      Visible = False
    end
    inherited btnProcurar: TBitBtn
      Left = 547
      Top = 125
      Caption = 'F5-Procura'
      TabOrder = 1
      OnClick = btnProcurarClick
    end
    inherited btnSair: TBitBtn
      Left = 655
      Top = 125
      TabOrder = 4
    end
    object JvDBGrid1: TJvDBGrid
      Left = 8
      Top = 4
      Width = 321
      Height = 173
      Align = alCustom
      DataSource = dsLote
      Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
      TabOrder = 8
      TitleFont.Charset = DEFAULT_CHARSET
      TitleFont.Color = clWindowText
      TitleFont.Height = -11
      TitleFont.Name = 'MS Sans Serif'
      TitleFont.Style = []
      OnCellClick = JvDBGrid1CellClick
      AlternateRowFontColor = clBlue
      AutoSizeColumns = True
      SelectColumnsDialogStrings.Caption = 'Select columns'
      SelectColumnsDialogStrings.OK = '&OK'
      SelectColumnsDialogStrings.NoSelectionWarning = 'At least one column must be visible!'
      EditControls = <>
      RowsHeight = 17
      TitleRowHeight = 17
      Columns = <
        item
          Expanded = False
          FieldName = 'OFL_CODLOT'
          Title.Caption = 'Lote'
          Width = 152
          Visible = True
        end
        item
          Expanded = False
          FieldName = 'RESERVA'
          Title.Caption = 'Quantidade'
          Width = 151
          Visible = True
        end>
    end
    object edDescriOf: TEdit
      Left = 424
      Top = 98
      Width = 337
      Height = 21
      Color = cl3DLight
      TabOrder = 9
    end
    object edQtde: TJvCalcEdit
      Left = 566
      Top = 37
      Width = 121
      Height = 21
      TabOrder = 6
      DecimalPlacesAlwaysShown = False
      OnKeyPress = edQtdeKeyPress
    end
    object edLocal: TEdit
      Left = 424
      Top = 37
      Width = 97
      Height = 21
      Hint = 'Local (ALMOX, PROC, NC) ou AJUSTE'
      CharCase = ecUpperCase
      ParentShowHint = False
      PopupMenu = PopupMenu2
      ShowHint = True
      TabOrder = 0
      OnExit = edLocalExit
      OnKeyPress = edOfDetKeyPress
    end
    object edJustificativa: TEdit
      Left = 424
      Top = 65
      Width = 263
      Height = 21
      CharCase = ecUpperCase
      PopupMenu = PopupMenu2
      TabOrder = 10
      Visible = False
    end
  end
  object gridComp: TJvDBGrid [2]
    Left = 0
    Top = 51
    Width = 777
    Height = 62
    Align = alCustom
    DataSource = dsComp
    Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
    TabOrder = 2
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'MS Sans Serif'
    TitleFont.Style = []
    AlternateRowFontColor = clBlue
    AutoSizeColumns = True
    SelectColumnsDialogStrings.Caption = 'Select columns'
    SelectColumnsDialogStrings.OK = '&OK'
    SelectColumnsDialogStrings.NoSelectionWarning = 'At least one column must be visible!'
    EditControls = <>
    RowsHeight = 17
    TitleRowHeight = 17
    Columns = <
      item
        Expanded = False
        FieldName = 'OFL_CDCOMP'
        Title.Caption = 'Componente'
        Width = 129
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'PRO_DESCRI'
        Title.Caption = 'Descricao'
        Width = 402
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'RESERVA'
        Title.Caption = 'Quantidade'
        Width = 227
        Visible = True
      end>
  end
  object gridVerOf: TJvDBGrid [3]
    Left = 0
    Top = 120
    Width = 777
    Height = 281
    Align = alCustom
    DataSource = dsOf
    Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
    TabOrder = 3
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'MS Sans Serif'
    TitleFont.Style = []
    OnCellClick = gridVerOfCellClick
    AlternateRowFontColor = clBlue
    AutoSizeColumns = True
    SelectColumnsDialogStrings.Caption = 'Select columns'
    SelectColumnsDialogStrings.OK = '&OK'
    SelectColumnsDialogStrings.NoSelectionWarning = 'At least one column must be visible!'
    EditControls = <>
    RowsHeight = 17
    TitleRowHeight = 17
    Columns = <
      item
        Expanded = False
        FieldName = 'OFL_CODPRO'
        Title.Caption = 'Produto'
        Width = 192
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'PRO_DESCRI'
        Title.Caption = 'Descricao'
        Width = 449
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'RESERVA'
        Title.Caption = 'Quantidade'
        Width = 56
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'TESTE'
        Width = 60
        Visible = True
      end>
  end
  inherited PopupMenu1: TPopupMenu
    inherited Procurar1: TMenuItem
      ShortCut = 116
      OnClick = btnProcurarClick
    end
  end
  object sqlComp: TSQLDataSet
    CommandText = 
      'SELECT '#13#10'  OFL_CODPRO,'#13#10'  OFL_CODLOT,'#13#10'  OFL_LOCEST,'#13#10'  OFL_CDCO' +
      'MP,'#13#10'  TO_CHAR(OFL_QTDEMP -  OFL_QTDCON, '#39'FM999999.9'#39')  AS RESER' +
      'VA,'#13#10'  PRO_DESCRI '#13#10'FROM   ATS_OFCONS_LOTE, F_PRODS '#13#10'WHERE '#13#10'  ' +
      'PRO_CODPRO = OFL_CDCOMP'#13#10'  AND (OFL_QTDEMP-OFL_QTDCON) > 0'
    MaxBlobSize = -1
    Params = <>
    SQLConnection = dm.SQLConnection1
    Left = 56
    Top = 88
    object sqlCompOFL_CDCOMP: TStringField
      FieldName = 'OFL_CDCOMP'
      Required = True
      Size = 26
    end
    object sqlCompPRO_DESCRI: TStringField
      FieldName = 'PRO_DESCRI'
      Required = True
      Size = 100
    end
    object sqlCompRESERVA: TStringField
      FieldName = 'RESERVA'
      Size = 9
    end
  end
  object dspComp: TDataSetProvider
    DataSet = sqlComp
    Options = [poAllowCommandText]
    Left = 56
    Top = 120
  end
  object cdsComp: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dspComp'
    Left = 56
    Top = 152
    object cdsCompOFL_CDCOMP: TStringField
      FieldName = 'OFL_CDCOMP'
      Required = True
      Size = 26
    end
    object cdsCompPRO_DESCRI: TStringField
      FieldName = 'PRO_DESCRI'
      Required = True
      Size = 100
    end
    object cdsCompRESERVA: TStringField
      FieldName = 'RESERVA'
      Size = 9
    end
  end
  object dsComp: TDataSource
    DataSet = cdsComp
    Left = 56
    Top = 184
  end
  object sqlLote: TSQLDataSet
    CommandText = 
      'SELECT '#13#10'  OFL_CODPRO,'#13#10'  OFL_CODLOT,'#13#10'  OFL_LOCEST,'#13#10'  OFL_CDCO' +
      'MP,'#13#10'  TO_CHAR(OFL_QTDEMP -  OFL_QTDCON, '#39'FM999999.0'#39')  AS RESER' +
      'VA,'#13#10'  PRO_DESCRI,  TO_CHAR(OFL_QTDEMP, '#39'FM999999.9'#39') OFL_QTDEMP' +
      ', TO_CHAR(OFL_QTDCON,'#39'FM999999.9'#39') OFL_QTDCON '#13#10'FROM   ATS_OFCON' +
      'S_LOTE, F_PRODS '#13#10'WHERE '#13#10'  PRO_CODPRO = OFL_CDCOMP'#13#10'  AND (OFL_' +
      'QTDEMP-OFL_QTDCON) > 0'
    MaxBlobSize = -1
    Params = <>
    SQLConnection = dm.SQLConnection1
    Left = 560
    Top = 464
    object sqlLoteOFL_CODPRO: TStringField
      FieldName = 'OFL_CODPRO'
      Required = True
      Size = 26
    end
    object sqlLoteOFL_CODLOT: TFMTBCDField
      FieldName = 'OFL_CODLOT'
      Required = True
      Precision = 32
      Size = 8
    end
    object sqlLoteOFL_LOCEST: TStringField
      FieldName = 'OFL_LOCEST'
      Required = True
      Size = 10
    end
    object sqlLoteOFL_CDCOMP: TStringField
      FieldName = 'OFL_CDCOMP'
      Required = True
      Size = 26
    end
    object sqlLotePRO_DESCRI: TStringField
      FieldName = 'PRO_DESCRI'
      Required = True
      Size = 100
    end
    object sqlLoteRESERVA: TStringField
      FieldName = 'RESERVA'
      Size = 9
    end
    object sqlLoteOFL_QTDEMP: TStringField
      FieldName = 'OFL_QTDEMP'
      Size = 9
    end
    object sqlLoteOFL_QTDCON: TStringField
      FieldName = 'OFL_QTDCON'
      Size = 9
    end
  end
  object dspLote: TDataSetProvider
    DataSet = sqlLote
    Options = [poAllowCommandText]
    Left = 600
    Top = 472
  end
  object cdsLote: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dspLote'
    Left = 632
    Top = 472
    object cdsLoteOFL_CODPRO: TStringField
      FieldName = 'OFL_CODPRO'
      Required = True
      Size = 26
    end
    object cdsLoteOFL_CODLOT: TFMTBCDField
      FieldName = 'OFL_CODLOT'
      Required = True
      Precision = 32
      Size = 8
    end
    object cdsLoteOFL_LOCEST: TStringField
      FieldName = 'OFL_LOCEST'
      Required = True
      Size = 10
    end
    object cdsLoteOFL_CDCOMP: TStringField
      FieldName = 'OFL_CDCOMP'
      Required = True
      Size = 26
    end
    object cdsLotePRO_DESCRI: TStringField
      FieldName = 'PRO_DESCRI'
      Required = True
      Size = 100
    end
    object cdsLoteRESERVA: TStringField
      FieldName = 'RESERVA'
      Size = 9
    end
    object cdsLoteOFL_QTDEMP: TStringField
      FieldName = 'OFL_QTDEMP'
      Size = 9
    end
    object cdsLoteOFL_QTDCON: TStringField
      FieldName = 'OFL_QTDCON'
      Size = 9
    end
  end
  object dsLote: TDataSource
    DataSet = cdsLote
    Left = 664
    Top = 472
  end
  object sqlOf: TSQLDataSet
    CommandText = 
      'SELECT OFL_CODPRO, PRO_DESCRI,'#13#10'  TO_CHAR(SUM(OFL_QTDEMP-OFL_QTD' +
      'CON), '#39'FM999999.9'#39') AS RESERVA'#13#10'  , ROUND(SUM(OFL_QTDEMP-OFL_QTD' +
      'CON),3) as TESTE       FROM ATS_OFCONS_LOTE,  F_PRODS '#13#10'        ' +
      '  WHERE'#13#10'  PRO_CODPRO = OFL_CODPRO '#13#10'GROUP BY'#13#10' OFL_CODPRO, PRO_' +
      'DESCRI'
    MaxBlobSize = -1
    Params = <>
    SQLConnection = dm.SQLConnection1
    Left = 360
    Top = 248
    object sqlOfPRO_DESCRI: TStringField
      FieldName = 'PRO_DESCRI'
      Required = True
      Size = 100
    end
    object sqlOfOFL_CODPRO: TStringField
      FieldName = 'OFL_CODPRO'
      Required = True
      Size = 26
    end
    object sqlOfRESERVA: TStringField
      FieldName = 'RESERVA'
      Size = 9
    end
    object sqlOfTESTE: TFMTBCDField
      FieldName = 'TESTE'
      Precision = 32
      Size = 8
    end
  end
  object dspOF: TDataSetProvider
    DataSet = sqlOf
    Options = [poAllowCommandText]
    Left = 360
    Top = 280
  end
  object cdsOf: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dspOF'
    Left = 360
    Top = 312
    object cdsOfPRO_DESCRI: TStringField
      FieldName = 'PRO_DESCRI'
      Required = True
      Size = 100
    end
    object cdsOfOFL_CODPRO: TStringField
      FieldName = 'OFL_CODPRO'
      Required = True
      Size = 26
    end
    object cdsOfRESERVA: TStringField
      FieldName = 'RESERVA'
      Size = 9
    end
    object cdsOfTESTE: TFMTBCDField
      FieldName = 'TESTE'
      DisplayFormat = ',##0.0'
      EditFormat = ',##0.0'
      Precision = 32
      Size = 8
    end
  end
  object dsOf: TDataSource
    DataSet = cdsOf
    Left = 360
    Top = 344
  end
  object sqlProd: TSQLQuery
    MaxBlobSize = -1
    Params = <>
    SQLConnection = dm.SQLConnection1
    Left = 40
    Top = 32
  end
  object PopupMenu2: TPopupMenu
    Left = 712
    Top = 416
    object ransferir1: TMenuItem
      Caption = 'Transferir'
      ShortCut = 116
      OnClick = btnGravarClick
    end
  end
  object sspLog: TSQLStoredProc
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftString
        Name = 'CODLOT'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'CODPRO'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'LOCEST'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'LOGUSU'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'HISTOR'
        ParamType = ptInput
      end
      item
        DataType = ftBCD
        Name = 'QTDMOV'
        ParamType = ptInput
      end>
    SQLConnection = dm.SQLConnection1
    StoredProcName = 'ATS_GERALOGLOTE'
    Left = 344
    Top = 408
  end
  object sspLog2: TSQLStoredProc
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftString
        Name = 'CODLOT'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'CODPRO'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'LOCEST'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'LOGUSU'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'HISTOR'
        ParamType = ptInput
      end
      item
        DataType = ftBCD
        Name = 'QTDMOV'
        ParamType = ptInput
      end>
    SQLConnection = dm.SQLConnection1
    StoredProcName = 'ATS_GERALOGLOTE'
    Left = 384
    Top = 408
  end
  object sspTransf: TSQLStoredProc
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftString
        Name = 'USUARIO'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'CDCOMP'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'ORIGEM'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'DESTINO'
        ParamType = ptInput
      end
      item
        DataType = ftBCD
        Name = 'CODLOT'
        ParamType = ptInput
      end
      item
        DataType = ftBCD
        Name = 'QTDE'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'JUSTIFICATIVA'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'MENSAGEM'
        ParamType = ptOutput
        Size = 2000
      end>
    SQLConnection = dm.SQLConnection1
    StoredProcName = 'ATS_TRANSSALDO_PROC'
    Left = 440
    Top = 406
  end
end
